<?php
echo $header;
echo $column_left;
echo $column_right;
$width_content = '100%';
if (($column_left) && ($column_right)) {
    $width_content = '48%';
} elseif (($column_left) || ($column_right)) {
    $width_content = '74%';
}
$style = '';
if ($column_left) {
    $style .= '; margin-left:1%';
}
if ($column_right) {
    $style .= '; margin-right:1%';
}
?>
<div class="content" style="width:<?php echo $width_content . $style; ?>"><?php echo $content_top; ?>
    <div class="breadcrumb">
        <?php foreach ($breadcrumbs as $breadcrumb) { ?>
            <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
        <?php } ?>
    </div>
    <ul data-role="listview" data-divider-theme="a">
        <li data-role="list-divider"><h1><?php echo $heading_title; ?></h1></li>
    </ul><br />
    <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="payment">
        <div data-role="fieldcontain">
            <ul data-role="listview" data-divider-theme="a">
                <li data-role="list-divider"><?php echo $text_your_payment; ?></li>
                <li>
                    <input class="large-field" placeholder="<?php echo $entry_tax; ?>" type="text" name="tax" value="<?php echo $tax; ?>" />
                </li>
                <li>
                    <fieldset data-role="controlgroup">
                        <legend><?php echo $entry_payment; ?></legend>
                        <input type="radio" name="payment" value="cheque" id="cheque"<?php echo ($payment == 'cheque' ? ' checked="checked"' : ''); ?> /><label for="cheque"><?php echo $text_cheque; ?></label>
                        <input type="radio" name="payment" value="paypal" id="paypal"<?php echo ($payment == 'paypal' ? ' checked="checked"' : ''); ?> /><label for="paypal"><?php echo $text_paypal; ?></label>
                        <input type="radio" name="payment" value="bank" id="bank"<?php echo ($payment == 'bank' ? ' checked="checked"' : ''); ?> /><label for="bank"><?php echo $text_bank; ?></label>
                    </fieldset>
                </li>
            </ul>
            <ul data-role="listview" data-divider-theme="a" id="payment-cheque" class="payment">
                <li>
                    <input class="large-field" placeholder="<?php echo $entry_cheque; ?>" type="text" name="cheque" value="<?php echo $cheque; ?>" />
                </li>
            </ul>
            <ul data-role="listview" data-divider-theme="a" id="payment-paypal" class="payment">
                <li>
                    <input class="large-field" placeholder="<?php echo $entry_paypal; ?>" type="text" name="paypal" value="<?php echo $paypal; ?>" />
                </li>
            </ul>
            <ul data-role="listview" data-divider-theme="a" id="payment-bank" class="payment">
                <li>
                    <input class="large-field" placeholder="<?php echo $entry_bank_name; ?>" type="text" name="bank_name" value="<?php echo $bank_name; ?>" />
                </li>
                <li>
                    <input class="large-field" placeholder="<?php echo $entry_bank_branch_number; ?>" type="text" name="bank_branch_number" value="<?php echo $bank_branch_number; ?>" />
                </li>
                <li>
                    <input class="large-field" placeholder="<?php echo $entry_bank_swift_code; ?>" type="text" name="bank_swift_code" value="<?php echo $bank_swift_code; ?>" />
                </li>
                <li>
                    <input class="large-field" placeholder="<?php echo $entry_bank_account_name; ?>" type="text" name="bank_account_name" value="<?php echo $bank_account_name; ?>" />
                </li>
                <li>
                    <input class="large-field" placeholder="<?php echo $entry_bank_account_number; ?>" type="text" name="bank_account_number" value="<?php echo $bank_account_number; ?>" />
                </li>
            </ul>
        </div>
        <div class="ui-body buttons">
            <fieldset class="ui-grid-a">
                <div class="ui-block-a left"><a data-icon="arrow-l" href="<?php echo $back; ?>" data-role="button" class="button"><span><?php echo $button_back; ?></span></a></div>
                <div class="ui-block-b right"><a data-icon="check" data-theme="c" onclick="$('#payment').submit();" data-role="button" class="button"><span><?php echo $button_continue; ?></span></a></div>
            </fieldset>
        </div>
    </form>
    <?php echo $content_bottom; ?></div>
<script type="text/javascript"><!--
    $('input[name=\'payment\']').bind('change', function() {
        $('.payment').hide();

        $('#payment-' + this.value).show();
    });

    $('input[name=\'payment\']:checked').trigger('change');
    //--></script>
<?php echo $footer; ?>